const Koa=require('koa2');
const serve=require('koa-static');
const views=require('koa-nunjucks-next');
const  bodyPareser=require('koa-bodyparser');
const logger=require('koa-logger');


const router=require('./router/routers');

const  app=new Koa();
app.use(serve(__dirname+'/public'));
app.use(serve(__dirname+'/dist'));
app.use(views('./views'));
app.use(bodyPareser());
app .use(logger());


app
    .use(router.routes())
    .use(router.allowedMethods());

app.listen(3000);
